package com.imooc.framework.thread;

import java.util.concurrent.Callable;

public class MyCallable implements Callable<String> {

    private String name;

    public MyCallable(String name){
        this.name = name;
    }
    @Override
    public String call() throws Exception {
        System.out.println("start task " + name);
        try {
            Thread.sleep(1000);
        }catch (InterruptedException e){

        }
        System.out.println("end task " + name);
        return "start task " + name;
    }
}
